package com.hzit.util;

import com.alibaba.fastjson.JSON;
import com.hzit.entity.R;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 输出数据到页面的工具类
 */
public class ResponseUtil {

	public static void out(HttpServletResponse response, R r){
		try {
			response.getWriter().println(JSON.toJSONString(r));
			response.getWriter().flush();
		} catch (IOException e) {
			e.printStackTrace();
		}

	}
}
